import request from 'umi-request';

export async function queryTurnPositiveList() {
  return request('/api/member/api-member/member/regular/getInfo', {
    method: 'get',
  }).then((res) => {
    if (res.flag) {
      return {
        data: res.data ? [res.data] : [],
        success: true,
      };
    } else {
      return {};
    }
  });
}

export async function saveTurnPositiveInfo(params) {
  return request('/api/member/api-member/member/member/create', {
    method: 'POST',
    data: {
      ...params,
    },
  }).then((res) => {
    return res;
  });
}

export async function regularBpm(oid) {
  return request(`/api/member/api-member/bpm/regular/${oid}`, {
    method: 'get',
  }).then((res) =>{
    return res;
  });
}
